package com.video.user.service;


import com.video.api.dto.InsertVideoDto;
import com.video.common.result.PageResult;
import com.video.user.domain.dto.UpdateVideoCountDto;
import com.video.user.domain.dto.QueryPageDto;
import com.video.user.domain.dto.VideoDto;
import com.video.user.domain.entity.VideoList;
import com.baomidou.mybatisplus.extension.service.IService;
import org.elasticsearch.client.RestHighLevelClient;

import java.io.IOException;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author la
 * @since 2024-11-09
 */
public interface IVideoListService extends IService<VideoList> {


    /*
    * 新增或编辑视频
    * */
    void InsertList(InsertVideoDto dto);

    /*
    * 分页查询视频列表
    * */
    PageResult queryVideoList(QueryPageDto dto);

    void removeVideoById(Long id);

    /*
    * 新增数量
    * */
    void updateVideoCount(UpdateVideoCountDto dto);

    /**
     * 使用es查询视频
     * @param keywords
     * @param highLevelClient
     * @return
     */
    PageResult searchList(VideoDto keywords, RestHighLevelClient highLevelClient) throws IOException;
}
